/*!	brief	The behaviour class is an virtual one. The developper must create another class, make it inherit from behaviour and attach it to an entities
 *  		to determine how an entity must interact with the application. To do so, the user must fill the Update function, wich is called at each frame
 *			refresh by the Applications static class
 */
Behaviour	=	function()
{
	/************************************
	/*			Properties				
	/************************************/
	
		this.m_Entity;								/*!< Store the Entity linked to the current Behaviour	*/
		this.m_Transform;							/*!< Shortcut to the Entity transform object			*/

	/************************************
	/*			Constructor				
	/************************************/
}

Behaviour.prototype.Init	=	function()
{

}

Behaviour.prototype.Update	=	function()
{

}

/*!	brief Method to overload if you want your Behaviour to automatically create an Entity to be attached to	*/
Behaviour.Instantiate	=	function(transform, behaviour)
{
	behaviour.m_Entity		=	Entity.Instantiate(transform);
	behaviour.m_Entity.m_Behaviours.push(behaviour);
	behaviour.m_Transform	=	behaviour.m_Entity.m_Transform;
	
	return behaviour;
	
}
/*!	brief	The current function will be call if the script is attached to an Entity	*/
Behaviour.prototype.Attached	=	function( entity)
{
	this.m_Entity		=	entity;
	this.m_Transform	=	this.m_Entity.m_Transform;
	this.Init();
}

